$(function () {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('echarts-line-chart'));
    $.ajax({
        type: "GET",
        url: "fin/demo/demo1",
        dataType: "json",
        success:function (result) {
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: result["text"]
                },
                tooltip: {},
                legend: {
                    data: ['欠款']
                },
                xAxis: {
                    data: ["线上用户", "睿苏公司", "个人用户"]
                },
                yAxis: {},
                series: [{
                    name: '欠款',
                    type: 'bar',
                    data: [500, 200, 1300]
                }]
            };
            myChart.setOption(option)
        }
    })
})